<template>
  <a-drawer
    width="908"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{height:'calc(100vh - 100px)',overflow:'auto'}"
    @close="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="单据编号" prop="measureNumber">
              <a-input :disabled="true" v-model="form.measureNumber" placeholder="请输入单据编号"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="测量员" prop="measurerObj">
            <select-user
              v-model="form.measurerObj"
              select-model="single" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="单据日期" prop="measureDate">
              <a-date-picker
                v-model="form.measureDate"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="地址" prop="address">
              <a-input v-model="form.address" placeholder="请输入地址"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="电话" prop="phone">
              <a-input v-model="form.phone" placeholder="请输入电话"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="12">
            <a-form-model-item label="备注" prop="remark">
              <a-input v-model="form.remark" placeholder="请输入备注"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
        <a-col :lg="24" :md="24" :sm="24">
          <a-form-model-item label="测量图片">
            <a-upload
              :headers="headers"
              :file-list="fileList"
              list-type="picture-card"
              :customRequest="handleChange"
              :remove='handleRemove'
            >
                上传
            </a-upload>
          </a-form-model-item>
        </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button :disabled="disabled" @click="cancel">
            取消
          </a-button>
          <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
            保存
          </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizMeasureEditForm from './BizMeasureForm'
export default {
  ...BizMeasureEditForm
}
</script>
